//
//  WYRedSectionView.m
//  Boss
//
//  Created by admin on 2018/6/7.
//  Copyright © 2018年 admin. All rights reserved.
//

#import "WYRedSectionView.h"
@interface WYRedSectionView()

@property (strong, nonatomic) IBOutlet UILabel *allPrice;
@property (strong, nonatomic) IBOutlet UILabel *countLabel;
@property (strong, nonatomic) IBOutlet UILabel *bestLabel;
@property (strong, nonatomic) IBOutlet UILabel *allCountLabel;
@property (strong, nonatomic) IBOutlet UILabel *leftName;
@property (strong, nonatomic) IBOutlet UILabel *countBomLabel;

@end
@implementation WYRedSectionView

+(instancetype)getSectionView
{
    return [[NSBundle mainBundle]loadNibNamed:@"WYRedSectionView" owner:nil options:nil].firstObject;
}
-(void)setReceive:(WYMYReceive *)receive
{
    _receive = receive;
    self.bestLabel.text = receive.totalLuckiest;
    self.allPrice.text = [NSString stringWithFormat:@"%.3f",receive.totalAmount.floatValue/1000.f];
    self.allCountLabel.text =receive.totalNumber;
}
-(void)setSReceive:(WYMYReceive *)sReceive
{
    _sReceive = sReceive;
    self.bestLabel.text = sReceive.totalPV;
    self.allPrice.text = [NSString stringWithFormat:@"%.3f",sReceive.totalAmount.floatValue/1000.f];
    self.allCountLabel.text =sReceive.totalNumber;
    self.countLabel.text = @"总计曝光次数";
    self.leftName.text = @"您总计发出:";
    self.countBomLabel.text = @"总计发出";
}
 

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (IBAction)clickYearAction:(UIButton *)sender {
    if ([self.delegate respondsToSelector:@selector(didSelectYear)]) {
        [self.delegate didSelectYear];
    }
    
    
    
}

@end
